Print Commands


There are three commands in MMB that deal with printing:

  •  PrintText - prints text from some object
  •  PrintPage - prints entire MMB project page
  •  PrintRect - prints everything inside specified rectangle

 

PrintText("ObjectLabel","Parameters")
Description
 


Prints content of specified text object.


Use first parameter to set label of text object you want to print text from. For example:

Paragraph

Second parameter is optional. By default, text is printed using default font style and size. Using this parameter:

FONT_FROM_OBJECT

...text will be printed using original font style and size of text object.

Code Examples
 

** Print text from object labeled "StoryBox" using default text style:
PrintText("StoryBox","")

** Print text from object labeled "Paragraph" using object's text style:
PrintText("StoryBox","FONT_FROM_OBJECT")

Additional Info
 
This command prints text from MMB's Text and Paragraph objects.

 

PrintPage("Page")
Description
 


Prints content of currently displayed project page.


There is one available parameter, and it's optional. If you leave it empty or set:

100

...page will be printed with full fit to page.

Setting lower values, like

80

...will print page at 80% of width of the paper.

Code Examples
 

** Print current page with full fit:
PrintPage("")

** Print current page at 60% of paper width:
PrintPage("60")

 

PrintRect("ObjectLabel","Zoom")
Description
 


Prints content inside specified rectangle object.

First parameter sets label of rectangle object that is being used as a contour (border) for print content. For example:

GreyRectangle


Second parameter is optional. If you leave it empty or set:

100

...page will be printed with full fit to page.

Setting lower values, like

80

...will print page at 80% of width of the paper.

Code Examples
 

** Print everything inside of RectForPrint:
PrintRect("RectForPrint","")

** Print everything inside of PrintBox at 90% of paper width:
PrintRect("PrintBox","90")

Additional Info
 
Either shape of rectangle object or it's visibility is irrelevant for this command, so you can have hidden square work for PrintRect too.

 

 

MMB Scripting Unleashed by Bokzy, 2003 :: All rights reserved :: http://www.bokzy.com